package com.hfzy.ihk.facade.linkcall.enums;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by Administrator on 2018/7/19.
 * 回答类型，回答方式
 * @author wws
 */
public enum CallTaskPhoneSource implements CustomEnumType {

    UPLOAD_EXCEL("UE", "上传Excel文件"),
    EBOOK_CUSTOMER_INFO("ECI", "电子客簿资料"),/*,
    PURCHASE_CUSTOMER_INFO("PCI", "多渠道的客户资料"),
    DEAL_CUSTOMER_INFO("DCI", "成交客户资料"),
    OWNER_INFO("OI", "楼盘业主资料")*/;

    private CallTaskPhoneSource(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;

    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }

    private static Map<String, CallTaskPhoneSource> map = new HashMap<>();
    static {
        for (CallTaskPhoneSource value : CallTaskPhoneSource.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static CallTaskPhoneSource fromValue(String value) {
        CallTaskPhoneSource ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + CallTaskPhoneSource.class + "." + value);
        }
    }

}
